<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Advanced Search Job</title>
    <meta name="author" content="supermen_IFI" />
    <meta name="keywords" content="" />
 	<meta name="description" content=""/>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    
    <!-- [template css] begin -->
	<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen, projection" />
	<link rel="stylesheet" href="css/960.css" type="text/css" media="screen, projection" />
    <link rel="stylesheet" href="css/print.css" type="text/css" media="print" /> 
    <script type="text/javascript" src="js/functions.js"></script>
    

</head>
<body>

	<!-- START TOP SECTION -->
	<div class="container_12">
	
		<!-- START LOGO -->
		<div class="grid_4 header">
			<img src="images/slider/banner-p6.jpg" alt="FEJOB" />
			<div align="right">
				<% 
					String type = (String) session.getAttribute("type");
					if (type == null)  { %>
						<a href="SignIn.jsp" title="Sign In"><font size="3">Sign In</font></a>
					<%
					} else { %>
				<a href="Homee.jsp" title="Sign Out"><font size="3">Sign Out</font></a>
				<% } %>
			</div>	
		</div>
		<!-- END LOGO -->
   	 
		<!-- START NAVIGATION -->
   	  	<div class="grid_8 header">
   	  		<div id="navigation">
				<ul id="nav">
					<li id="home"><a href="Home.jsp" title="Home page">Home</a></li>
					<li id="about"><a href="About.html" title="About">About</a></li>
					<li id="search_job"><a href="SearchJob.jsp" title="Search Job" class="currentPage">Search Job</a></li>
					<% 
					  type = (String) session.getAttribute("type");
					if (type == null)  {
					} else
					   if (type.equals("0")){
					%>
					<li id="cv_management"><a href="CVManagement.jsp" title="CV Management">CV Management</a></li>
					
					<% 
					   } else
					   if (type.equals("1")) {
					%>
					<li id="job_management"><a href="JobManagement.jsp" title="Job Management">Job Management</a></li>
					
					<% 
					   }session.removeAttribute("type"); 
					%>					
				</ul>
			</div>
		</div>
		<!-- END NAVIGATION -->
		
		<div class="clear"></div>
	</div>
	<!-- END TOP SECTION -->
   
	<!-- START MEDIUM SECTION -->
	<div class="container_12 medium">
	
		<!-- START GET IN TOUCH TEXT -->
   		<div class="grid_6">
	   		<div class="getTouch">
	   			<h2><span class="orange">Advanced Search Job</span></h2>
	   			<p>
					This section is used to search a job.
	   			</p>
	   			
	   		</div>
   		</div>
   		<!-- END GET IN TOUCH TEXT -->
   	
		<div class="clear"></div>
		
	</div>
	<!-- END MEDIUM SECTION -->
 
	<!-- START BOTTOM SECTION -->
	<div class="container_12">
	
		<!-- START CONTACT FORM -->
		<div class="grid_6" style="border: solid 1px #BBB6A5;padding:15px;float:left;width:50%">
			<div class="searchForm">
	   			<h2><span class="orange">Advanced Search</span></h2>	
				<form id="searchForm" action="Controller" method="GET">					
					<div class="formContent">
						<div>
							<label for="domain">Domain</label>					
							<select id="domain" name="domain" class="name" style="width:295px;"  onchange="changeSelect()">
								<option value="" selected="selected" >Select Domain</option>
								<option value="Informatique">Informatique</option>
								<option value="Economie" >Economie</option>
								<option value="Agriculture">Agriculture</option>
								<option value="Elevage">Elevage</option>
								
							</select>
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_domain',<%out.print(i); %>)" onmouseout="starLeave('star_domain','num_star_domain')" onmouseover="starHover('star_domain',<%out.print(i); %>)" id="star_domain_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_domain" id="num_star_domain" value="" />
						</div>
						
						<div>
						<label for="specialist">Specialist</label>			
							<select id="specialist" name="specialist" class="name" style="width:295px;">
							    <option selected="selected" >Select Specialist</option>
							    <option style="display:true">Base de données</option>
						        <option style="display:true">Genie logiciel</option>
						        <option style="display:true">Traitement d'images</option>
						        <option style="display:true">Recherche opérationnelle</option>	
					
								<% for(int i=0;i<0;i++) { %>
									<option><%out.println(i); %></option>
								<% } %>
							</select>
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_specialist',<%out.print(i); %>)" onmouseout="starLeave('star_specialist','num_star_specialist')" onmouseover="starHover('star_specialist',<%out.print(i); %>)" id="star_specialist_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_specialist" id="num_star_specialist" value="" />
						</div>
						
						<div>
							<label for="salary">Salary</label>					
							<input type="text" name="salary" id="salary" class="input" value="" style="float:left" />	
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_salary',<%out.print(i); %>)" onmouseout="starLeave('star_salary','num_star_salary')" onmouseover="starHover('star_salary',<%out.print(i); %>)" id="star_salary_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_salary" id="num_star_salary" value="" />
						</div>
						
						<div>
							<label for="work">Lieu de travail</label>					
							<select id="work" name="place_work" class="name" style="width:295px;">
								   <option>Hanoi</option>
								   <option>Ho Chi Minh</option>
								   <option>Saigon</option>
								    <option>lieu_travail</option>
								<% for(int i=0;i<0;i++) { %>
									<option><%out.println(i); %></option>
								<% } %>
							</select>
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_work',<%out.print(i); %>)" onmouseout="starLeave('star_work','num_star_work')" onmouseover="starHover('star_work',<%out.print(i); %>)" id="star_work_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_work" id="num_star_work" value="" />
						</div>
						<div>
							<label for="titre">Titre recherché</label>					
							<select id="titre" name="titre" class="titre" style="width:295px;">
								   <option>Ingénieur developpeur</option>
								   <option>Chef de projet</option>
								   <option>Designer</option>
								<% for(int i=0;i<0;i++) { %>
									<option><%out.println(i); %></option>
								<% } %>
							</select>
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_titre',<%out.print(i); %>)" onmouseout="starLeave('star_titre','num_star_titre')" onmouseover="starHover('star_titre',<%out.print(i); %>)" id="star_titre_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_titre" id="num_star_titre" value="" />
						</div>
						<div>
							<label for="year_experience">Year experience</label>					
							<input type="text" name="year_experience" id="year_experience" class="input" value="" style="float:left" />	
							<% for(int i=1;i<=5;i++) { %>
							<img onclick="starClick('num_star_year_experience',<%out.print(i); %>)" onmouseout="starLeave('star_year_experience','num_star_year_experience')" onmouseover="starHover('star_year_experience',<%out.print(i); %>)" id="star_year_experience_<%out.print(i); %>" src="images/star-icon-grey.png" />
							<% } %>
							<input type="hidden" name="num_star_year_experience" id="num_star_year_experience" value="" />
						</div>
						
						<input type="hidden" name="contact_form" value="1" />
						
						<div class="clear"></div>
						<div style="margin-top:20px">
						<button name="submit" type="submit"><span>Search</span></button>
						<button name="reset" type="reset"><span>Reset</span></button>	
						<button name="cancel" type="button" onclick="javascript:cancelAction();"><span>Cancel</span></button>								
						</div>
					</div>
					<input type="hidden" value="images/star-icon-grey.png" id="greystar" />
					<input type="hidden" value="images/star-icon-bright.png" id="brightstar" />
				</form>				
	   		</div>
		</div>
		<!-- END CONTACT FORM -->
		<%  
		    String indice = (String) session.getAttribute("indice");
			if (indice != null) {
		    int indic = (int)Integer.parseInt(indice);
		    if(indic!=0) {
		%> 
		<!-- START LIST JOB -->
		<div class="grid_6" style="border: solid 1px #BBB6A5;padding:15px;float:left;width:auto;">
			<h2><span class="orange">List of Search Job</span></h2>	
			<table>
				<% for(int i=0;i < indic;i++) {
					String poste = (String) session.getAttribute("poste"+i);
				%>
				<tr>
					<td><% 
					out.println((String)poste); %></td>
				</tr>
				<% }
				indic = 0; %>
			</table>
		</div>
		<% } 
		} %>

		<!-- END LIST JOB -->
	   	
	   	<div class="clear"></div>
	</div>
	<!-- END BOTTOM SECTION -->
	
   	<div class="clear"></div>
   	
	<!-- START FOOTER -->
   	<div class="container_12">
	   	<p class="footer">
	   		FEJOB_SUPERMAN_IFI
		</p>
	</div>
	<!-- END FOOTER -->
	
<!-- contact form validation -->
<script type="text/javascript">	
//<![CDATA[
  $(document).ready(function(){	
    $("#searchForm").validate({
		errorClass: "inputError",
		messages: {
			name: {
				required: ""				
			},
			email: {
				required: ""				
			}
		}
	})
  });
  function cancelAction() {
 	 document.location.href("SearchJob.jsp"); 
  }
//]]>
</script>
 
</body>
</html>